#pragma once

#include <Arduino.h>
#include <Preferences.h>

struct AppConfig {
  String wifiSsid = "BD3ND_J";
  String wifiPass = "12345678abc";
  String callsign = "BD3ND-10";
  String aprsServer = "rotate.aprs.net";
  uint16_t aprsPort = 14580;
  char symTable = '/';
  char symChar  = '>';
  // 新增：信标发送间隔（秒）与状态文本（附加到 APRS 报文末尾）
  uint16_t beaconIntervalSec = 60;  // 5分钟
  String   statusText = "ESP32 APRS";
};

extern Preferences prefs;
extern AppConfig cfg;

void loadConfig();
void saveConfig();
void printConfig();
